package com.solomiao.demo.multi.thread.demo8;

import java.util.concurrent.Callable;

public class CallableDemo8 implements Callable<Long> {

    @Override
    public Long call() throws Exception {
        System.out.println("正在执行，线程：" + Thread.currentThread().getName());
        try {
            // 模拟任务执行耗时
            Thread.sleep(5000);
        } catch (InterruptedException e) {
            System.out.println("任务 " + Thread.currentThread().getName() + " 被中断");
        }
        return System.currentTimeMillis();
    }

}
